package com.sgb.goods.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * 描述：商品发布-规格配置
 *
 * @author qiangHeNooo
 * 时间：2021.11.01
 */
public class GoodsPublishSkuListEntity implements Parcelable {
    /**
     * 商品规格类别
     */
    public String category;
    /**
     * 单价
     */
    public String money;
    /**
     * 类型
     */
    public int type;
    /**
     * 单位
     */
    public String unit;
    public String id;
    public String vipMaxPrice;
    /**
     * 商品规格sku属性子集
     */
    public List<GoodsSkuChild1> list;

    public boolean isFill;

    public GoodsPublishSkuListEntity() {}

    protected GoodsPublishSkuListEntity(Parcel in) {
        category = in.readString();
        money = in.readString();
        type = in.readInt();
        unit = in.readString();
        id = in.readString();
        vipMaxPrice = in.readString();
        isFill = in.readByte() != 0;
    }

    public static final Creator<GoodsPublishSkuListEntity> CREATOR = new Creator<GoodsPublishSkuListEntity>() {
        @Override
        public GoodsPublishSkuListEntity createFromParcel(Parcel in) {
            return new GoodsPublishSkuListEntity(in);
        }

        @Override
        public GoodsPublishSkuListEntity[] newArray(int size) {
            return new GoodsPublishSkuListEntity[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(category);
        dest.writeString(money);
        dest.writeInt(type);
        dest.writeString(unit);
        dest.writeString(id);
        dest.writeString(vipMaxPrice);
        dest.writeByte((byte) (isFill ? 1 : 0));
    }
}
